package com.itheima;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.scheduling.annotation.EnableScheduling;

@SpringBootApplication
@ServletComponentScan
@EnableScheduling
public class TliasWebManagementApplication {

    public static void main(String[] args) {
        // 创建spring容器, ApplicationContext结尾的就是容器对象
        ConfigurableApplicationContext ioc = SpringApplication.run(TliasWebManagementApplication.class, args);
        // 获取所有的bean对象
        String[] beanDefinitionNames = ioc.getBeanDefinitionNames();
        for (String beanDefinitionName : beanDefinitionNames) {
            System.out.println(beanDefinitionName);
        }
        // 关闭容器
        //ioc.close();
    }

}
